/*
 * gamepadreport.h
 *
 *  Created on: Oct 28, 2012
 *      Author: nam20485
 */

#ifndef GAMEPADREPORT_H_
#define GAMEPADREPORT_H_

#ifdef _GAMEPADREPORT
#include "Arduino.h"
#endif	//def _GAMEPADREPORT

//TODO: explain layout and representation of button and axis data

typedef struct
{
    uint8_t buttons;
    int8_t 	x;
    int8_t 	y;

    typedef enum
    {
    	FIRST = 	1 << 0,
    	SECOND = 	1 << 1,
    	THIRD = 	1 << 2,
    	FOURTH = 	1 << 3,
    	FIFTH = 	1 << 4,
    	SIXTH = 	1 << 5,
    	SEVENTH =	1 << 6,
    	EIGHTH = 	1 << 7

    } BUTTON;

    inline void setButton(BUTTON button)	{ buttons |= button; }

} USB_GamepadReport_Data_t;


#endif /* GAMEPADREPORT_H_ */
